package lhdx8;

public class Veterinarian {
    private String names;

    public String getNames() {
        return names;
    }

    public void setNames(String names) {
        this.names = names;
    }

    public Veterinarian(String names) {
        this.names = names;
    }
    public void cure(Pet a){
        System.out.println("兽医"+names+"正在给宠物"+a.getName()+"看病！");
        a.print();
        if (a.getE()<70){
            System.out.println("兽医"+names+"给宠物"+a.getName()+"治疗！");
            a.setE(70);
            System.out.println("已治好！");
        }else {
            System.out.println("这只宠物"+a.getName()+"很健康！");
        }

    }
}
